package preparedstatement;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public enum PreparedStatementUtil {
    INSTANCE;

    public Connection getConnection() {
        try {
            Class.forName("com.mysql.cj.jdbc.Driver");
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
        Connection connection = null;
        try {
            connection = DriverManager.getConnection("jdbc:mysql://60.205.142.63:3306/how2j?characterEncoding=UTF-8", "root", "root");
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return connection;
    }

}
